////////////////////////////////////////////////////////////////////////////////
//
//  Copyright (C) 2003-2006 Adobe Macromedia Software LLC and its licensors.
//  All Rights Reserved. The following is Source Code and is subject to all
//  restrictions on such code as contained in the End User License Agreement
//  accompanying this product.
//
////////////////////////////////////////////////////////////////////////////////

package mx.core
{

[ExcludeClass]

/**
 *  @private
 *  The IFlexModuleFactory interface represents the contract expected
 *  for bootstrapping Flex applications and dynamically loaded
 *  modules.
 *
 *  <p>Calling the <code>info()</code> method is legal immediately after
 *  the "complete" event is dispatched.</p>
 *
 *  <p>A well-behaved module will dispatch a "ready" event when
 *  it is safe to call the <code>create()</code> function.</p>
 */
public interface IFlexModuleFactory
{
	//--------------------------------------------------------------------------
	//
	//  Methods
	//
	//--------------------------------------------------------------------------

	/**
     *  The <code>create()</code> method is a factory method that requests
     *  an instance of a definition known to the module.
     *
     *  An optional set of parameters may be provided to allow
     *  building factories that can change what they create based
     *  on their input.
	 *  Passing <code>null</code> indicates that the default
     *  definition should be created, if possible.
     *
     *  @param parameters An optional arbitrary parameter block.
	 *
     *  @return A created instance, or null.
	 */
    function create(parameters:Object = null):Object;

	/**
     *  The <code>info()</code> method returns a block of key/value pairs
     *  holding static data known to the module.
     *  This method always succeeds, but may return an empty object.
     *
     *  @return An object containing key/value pairs
     *  Some defaults include:
     *  fonts: a list of embedded font faces
     *  rsls: a list of runtime shared libraries
     *  mixins: a list of classes initialized at startup
	 */
    function info():Object;
}

}
